#pragma once

#include <linux/of/device_node.h>

extern struct device_node *of_root;

#if defined(CONFIG_SPARC)
#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 2
#else
#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
#endif

#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1

void fdt_scan_reserved_mem_reg_nodes(void);

void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align));
